Allows all applications to exit gracefully and turns the computer off.
This procedure asks the Finder to shutdown your computer. It does this in the same way as when you select the ”Shutdown“ menu item in the ”Special“ menu of the Finder. Hence it quits every program running and they ask to save the open documents. Therefore this is a very save way to shutdown the computer.
The Finder is not able to process the request until 4D is idle, i.e. no procedure running.
Needless to say is that when code in a procedure is executed after this command, the command failed to function!
Not every Macintosh is able to shutdown and turn itself off. You can use the Gestalt Pro external package (from the same author) to determine if it is possible.
If the computer can not turn itself off, the computer will close itself down and present an alert to the user when it is save to turn the computer off.
Being able to shutdown is usefull when a lenghty operation is executed and you won't be around when it is finished. You can then let the computer turn itself off. But make sure no other application will ask to save documents etc. This includes File Sharing which will put an alert on screen when one or more users are connected.